define(['app'], function(app) {
	'use strict';

	// 实例化方法
	var factory = function(Http) {
		function get_data_return_detail(result){
			if(HTTP_ISLOGIC){
				result = '{"sucsse":true,"msg":"value","result":{"order_id":1,"order_status":"未完成","member_id":12345235,"uname":"王大锤","apply_time":"2017-09-20 ","status":1,"is_intervene":1,"refund_status":1,"money":2000,"reason":"实际发货与网页描述不符，而且收到的货有损坏，不好，所以申请退货","limit_time":"2天 15:40","addr":"桂林市规模大道100号6栋4楼","comp_id":"顺丰快递","shop_no":15486328871289644,"process":[{"time":"2017-10-20 15:30:50","event":"提出退款"},{"time":"2017-10-21 15:30:50","event":"同意退款"},{"time":"2017-10-20 17:30:50","event":"退款结束"}]}}';
				return JSON.parse(result);
			}else
			return result;
		}
		// 返回信息
		return {
			// 获取首页数据
			get_refundtenderdetail : function(callback) {
				
				var data = new Object();
				
				data.saleman = [{name:'制造商1',fouce:'4744',trade:'77143',sale:'4328262',count:'94222'}
				,{name:'制造商2',fouce:'4724',trade:'77453',sale:'482362',count:'98322'}
				,{name:'制造商3',fouce:'4734',trade:'77343',sale:'482262',count:'94542'}
				,{name:'制造商4',fouce:'4734',trade:'77343',sale:'482262',count:'94542'}
				,{name:'制造商5',fouce:'4734',trade:'77343',sale:'482262',count:'94542'}
				];
				
				data.city = [{name:'上海',fouce:'4744',trade:'77143',sale:'4328262',count:'94222'}
				,{name:'北京',fouce:'4724',trade:'77453',sale:'482362',count:'98322'}
				];

				// 函数回调
				if (callback)
					callback(data);
				
					
			
			},
			return_detail:function(order_id,callback){
				Http.post({
					method:'order.return.detail',
					order_id:order_id
				},function(result){
					if(callback)
					callback(get_data_return_detail(result).result);
				},function(e){
					
				},function(){
					
				})
			}
		};
	}

	factory.$inject = [ 'Http' ];
	return app.registerService("Refundtenderdetail", factory);
});